package cn.hackcloud.designpattern.flyweight;

import java.util.HashMap;

public class WebSiteFactory {
	HashMap<String, ConcreateWebSite> pool = new HashMap<String, ConcreateWebSite>();

	public WebSite getWebSiteCategory(String type) {
		if (!pool.containsKey(type)) {
			pool.put(type, new ConcreateWebSite(type));
		}
		return pool.get(type);
	}

	public int getWebSiteCount() {
		return pool.size();
	}
}
